from xmlrpc.server import SimpleXMLRPCServer
class Calculate:
    def add(self, x, y) -> int:
        return x + y

if __name__ == "__main__":
    cal = Calculate()
    sxr = SimpleXMLRPCServer(("localhost",8848))
    sxr.register_instance(cal)
    sxr.serve_forever()